package com.fly.common.persistence;

import com.fly.common.persistence.annotation.MyBatisDao;

/**
 * Created by SWan on 2017/3/29.
 * Dao基础接口类
 */
public interface BaseDao<T> {

    /**
     * 获取单条数据
     * @param id
     * @return
     */
    T get(Integer id);

    /**
     * 获取单条数据
     * @param entity
     * @return
     */
    T get(T entity);

    /**
     * 插入数据
     * @param entity
     * @return
     */
    int insert(T entity);


}
